<h1 class="heading">Dados do sistema</h1>

<form id="form_sistema" action="<?php echo url_for('sistema/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_sistema='.$form->getObject()->getIdSistema() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_sistema" value="<?php echo $form->getObject()->getIdSistema() ?>" />
<?php endif; ?>
<?php echo $form->renderHiddenFields() ?>
<?php echo $form->renderGlobalErrors() ?>
<div class="tabs">
    <ul>
        <li><a href="#tab_dados">Dados</a></li>
        <li><a href="#tab_quem_somos">Quem Somos</a></li>
        <li><a href="#tab_produtos">Produtos e serviços</a></li>
    </ul>
    <div id="tab_dados">
        <table class="form">
            <tbody>
              <tr>
                <th><?php echo $form['nm_sistema']->renderLabel() ?></th>
                <td>
                  <?php echo $form['nm_sistema']->render(array('size' => 50)) ?>
                  <?php echo form_error('nm_sistema'); ?>
                </td>
              </tr>
              <tr>
                <th><?php echo $form['ds_twitter']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_twitter']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_twitter'); ?>
                </td>
              </tr>
              <tr>
                <th><?php echo $form['ds_facebook']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_facebook']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_facebook'); ?>
                </td>
              </tr>
              <tr>
                <th><?php echo $form['ds_youtube']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_youtube']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_youtube'); ?>
                </td>
              </tr>
              <tr>
                <th><?php echo $form['ds_orkut']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_orkut']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_orkut'); ?>
                </td>
              </tr>
              <tr>
                <th><?php echo $form['ds_flickr']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_flickr']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_flickr'); ?>
                </td>
              </tr>
            </tbody>
        </table>
    </div>
    <div id="tab_quem_somos">
        <table class="form">
            <tbody>
              <tr>
                <th><?php echo $form['ds_sobre']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_sobre'] ?>
                  <?php echo form_error('ds_sobre'); ?>
                </td>
              </tr>
            </tbody>
        </table>
    </div>
    <div id="tab_produtos">
        <table class="form">
            <tbody>
              <tr>
                <th><?php echo $form['ds_servico']->renderLabel() ?></th>
                <td>
                  <?php echo $form['ds_servico'] ?>
                  <?php echo form_error('ds_servico'); ?>
                </td>
              </tr>
            </tbody>
        </table>
    </div>
</div>

<?php
	comandos_form(
		null,
		submit_tag(':: Salvar ::')
	);
?>
</form>

<script type="text/javascript">
$(document).ready(function()
{
	System.setdata.tab();
    System.formdata.save(new Array("msgAtencao", "Atenção:"));
});
</script>

<?php preenche_mensagem_flash() ?>